package com.zhangyu.eat.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.Window;

import com.avos.avoscloud.AVOSCloud;

import butterknife.ButterKnife;

/**
 * Created by SoSho on 2016/10/14.
 */

public abstract class BaseActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());
        ButterKnife.bind(this);
        AVOSCloud.initialize(this, "9pP4SvTy9nioNBxs37JcJdog-gzGzoHsz", "0q4qKJJ7WyT0hy5DhadxWwjO");
        initView();
    }

    @Override
    protected void onResume() {
        super.onResume();
        //做数据统计
    }

    @Override
    protected void onPause() {
        super.onPause();
        //做数据统计
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    protected abstract void initView();

    public abstract int getLayoutId();
}
